<%-- 
    Document   : studentform
    Created on : Jul 11, 2008, 10:58:28 PM
    Author     : Gaurav Gupta
--%>
<%@ include file="/common/taglibs.jsp"%>

<head>
    <title><fmt:message key="studentDetail.title"/></title>
    <meta name="heading" content="<fmt:message key='studentDetail.heading'/>"/>
</head>
<form:form commandName="student" method="post" action="studentform.html" id="studentForm" onsubmit="return validateStudent(this)">
<form:errors path="*" cssClass="error" element="div"/>
<form:hidden path="id"/>
<ul>
    <li>
        <appfuse:label styleClass="desc" key="student.name"/>
        <form:errors path="name" cssClass="fieldError"/>
        <form:input path="name" id="name" cssClass="text medium"/>
    </li>

    <li>
        <appfuse:label styleClass="desc" key="student.rollNo"/>
        <form:errors path="rollNo" cssClass="fieldError"/>
        <form:input path="rollNo" id="rollNo" cssClass="text medium"/>
    </li>
    <li>
        <appfuse:label styleClass="desc" key="student.marks"/>
        <form:errors path="marks" cssClass="fieldError"/>
        <form:input path="marks" id="marks" cssClass="text medium"/>
    </li>
    <li>
        <appfuse:label styleClass="desc" key="student.branch"/>
        <form:errors path="branch" cssClass="fieldError"/>
        <form:input path="branch" id="branch" cssClass="text medium"/>
    </li>

    <li class="buttonBar bottom">
        <input type="submit" class="button" name="save" value="<fmt:message key="button.save"/>"/>
        <c:if test="${not empty student.id}">
        <input type="submit" class="button" name="delete" onclick="return confirmDelete('student')" 
            value="<fmt:message key="button.delete"/>" />
        </c:if>
        <input type="submit" class="button" name="cancel" value="<fmt:message key="button.cancel"/>" onclick="bCancel=true"/>
    </li>
</ul>
</form:form>
<v:javascript formName="student" cdata="false" dynamicJavascript="true" staticJavascript="false"/>
<script type="text/javascript" src="<c:url value="/scripts/validator.jsp"/>"></script>
<script type="text/javascript">
    Form.focusFirstElement($('studentForm'));
</script>